home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / BASX2DEC.HDR < prev    next >
Text File  |  1994-04-25  |  854b  |  44 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _BaseX2Dec( cNum, nBase ) --> nDecimalValue
  8.  
  9. PARAMETERS:
  10.  
  11. cNum  : number (in base 1 ... 72)
  12. nBase : number indicating base of cNum
  13.  
  14. SHORT:
  15.  
  16. Convert any base between 1 and 72 to decimal.
  17.  
  18. DESCRIPTION:
  19.  
  20. _BaseX2Dec() converts a number of any base between 1 and 72 to it's
  21. numeric decimal equivalent.
  22.  
  23. See CAUTIONS under _BaseX2BaseY().
  24.  
  25. NOTE:
  26.  
  27.  
  28.  
  29. EXAMPLE:
  30.  
  31. #define HEX  16
  32. #define BIN  2
  33.  
  34. t = _BaseX2Dec('F',HEX)
  35. Result: t = 15
  36.  
  37. t = _BaseX2Dec('1101',HEX)
  38. Result: t = 4353
  39.  
  40. t = _BaseX2Dec('1101',BIN)
  41. Result: t = 13
  42.  
  43. ******************************************************************************/
  44.